<% layout("../../includes/layout-form-v2") -%>
<form  id="form" class="form-submission backend <%-action%> id_<%- id %>" title="<%-controller%>" action='<%- id %>' method='post'>
    <div class="box-body">
    

           <div class="input-group">
            	<p class="error_msg  error_in_branch_id"></p>
                <span class="input-group-addon"><b>Company </b></span>
                <select name="company_id" id="company_id" class="form-control">
		         <% if(refData.companyList.length){ 
			      	 	 for(var i = 0; i < refData.companyList.length;i++) {%>
			                  	<option <%= (record['company_id'] == refData.companyList[i].id) ? 'selected' : '' %> value="<%=refData.companyList[i].id%>"><%=refData.companyList[i].name%></option>
			      <%     }
			        }
			      %>   
                </select>
           </div><br/>
    
        <div class="input-group">
		    <span class="input-group-addon"><b>Name</b></span>
		    <input name="name" type="text" class="form-control" id="name" value="<%- record['name'] %>" placeholder="Enter name">
		    <span class="input-group-addon error_msg_field err_name"><b class="error_msg error_in_name"></b></span>
		</div><br/>
        
        <div class="input-group">
         <span class="input-group-addon"><b>Address</b></span>
            <input name="address" type="text" class="form-control" id="address" value="<%- record['address'] %>" placeholder="Enter address">
            <span class="input-group-addon error_msg_field err_address"><b class="error_msg error_in_address"></b></span>
        </div><br/>
        
        <div class="input-group">
         <span class="input-group-addon"><b>Contact Number</b></span>
            <input name="contact_number" type="text" class="form-control" id="contact_number" value="<%- record['contact_number'] %>" placeholder="Enter contact number">
            <span class="input-group-addon error_msg_field err_contact_number"><b class="error_msg error_in_contact_number"></b></span>
        </div><br/>
        
        <div class="input-group">
         <span class="input-group-addon"><b>Contact Person</b></span>
            <input name="contact_person" type="text" class="form-control" id="contact_person" value="<%- record['contact_person'] %>" placeholder="Enter contact person">
            <span class="input-group-addon error_msg_field err_contact_person"><b class="error_msg error_in_contact_person"></b></span>
        </div><br/>
        
       <div class="input-group">
         <span class="input-group-addon"><b>IP Address</b></span>
            <input name="ip" type="text" class="form-control" id="ip" value="<%- record['ip'] %>" placeholder="Enter ip address">
        	<span class="input-group-addon error_msg_field err_ip"><b class="error_msg error_in_ip"></b></span>
        </div><br/>
        
        <div class="input-group">
         <span class="input-group-addon"><b>Status</b></span>
         <select name="status" class="form-control">
         	<option value="0" <%- (record['status'] == "0")?"selected":"" %>>Enable</option>
         	<option value="1" <%- (record['status'] == "1")?"selected":"" %>>Disable</option>
         </select>
         
     </div>
      
    </div><!-- /.box-body -->

    <div class="box-footer">
        <input type="submit" class="btn btn-primary btn-lg " value="Save" />
    </div>
</form>